package com.yunhe.xyxxgl.view;

import java.util.Scanner;

/**
 * Created by Administrator on 2017/8/8 0008.
 */
public class Index {
    public static int indexUI(){
        System.out.println("********************************学员信息管理系统************************");
        System.out.println("1.讲师登录\t2.管理员登录\t3.学生登录");
        Scanner sc = new Scanner(System.in);
        try{
            int i = sc.nextInt();
            if(i<1 || i>2){
                throw new Exception("操作码未识别！");
            }
            return i;
        }catch(Exception e){
            String msg = e.getMessage();
            System.out.println((null != msg) ? msg : "输入错误！");
            return indexUI();
        }
    }
}
